/**
 邮箱校验
 */
export const isEmail = (s: string):boolean => {
  return /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+((.[a-zA-Z0-9_-]{2,3}){1,2})$/.test(s)
}

/**
 手机号校验
 */
export const isMobile = (s: string): boolean => {
  return /^1[0-9]{10}$/.test(s)
}

/**
 电话号校验
 */
export const isPhone = (s: string): boolean => {
  return /^([0-9]{3,4}-)?[0-9]{7,8}$/.test(s)
}
/**
 是否url地址
 */
export const isURL = (s: string): boolean => {
  return /^http[s]?:\/\/.*/.test(s)
}
